﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BotvaBot.RichUI;

namespace BotvaBot.Client.WPF
{
    public class SimpleCommandsFormDataModel : BaseDataModel
    {
        public void Copy(SimpleCommandsFormDataModel etalon)
        {
            Url = etalon.Url;
            Method = etalon.Method;
            GET = etalon.GET;
            POST = etalon.POST;
            Headers = etalon.Headers;
            InputCookies = etalon.InputCookies;
            OutputCookies = etalon.OutputCookies;
            Html = etalon.Html;
        }

        public void Clear()
        {
            Url = string.Empty;
            Method = string.Empty;
            GET = string.Empty;
            POST = string.Empty;
            Headers = string.Empty;
            InputCookies = string.Empty;
            OutputCookies = string.Empty;
            Html = string.Empty;
        }

        protected string m_Url = string.Empty;
        public string Url
        {
            get { return m_Url; }
            set
            {
                m_Url = value;
                OnPropertyChanged("Url");
            }
        }

        protected string m_Method = string.Empty;
        public string Method
        {
            get { return m_Method; }
            set
            {
                m_Method = value;
                OnPropertyChanged("Method");
            }
        }

        protected string m_GET = string.Empty;
        public string GET
        {
            get { return m_GET; }
            set
            {
                m_GET = value;
                OnPropertyChanged("GET");
            }
        }

        protected string m_POST = string.Empty;
        public string POST
        {
            get { return m_POST; }
            set
            {
                m_POST = value;
                OnPropertyChanged("POST");
            }
        }

        protected string m_Headers = string.Empty;
        public string Headers
        {
            get { return m_Headers; }
            set
            {
                m_Headers = value;
                OnPropertyChanged("Headers");
            }
        }

        protected string m_InputCookies = string.Empty;
        public string InputCookies
        {
            get { return m_InputCookies; }
            set
            {
                m_InputCookies = value;
                OnPropertyChanged("InputCookies");
            }
        }

        protected string m_OutputCookies = string.Empty;
        public string OutputCookies
        {
            get { return m_OutputCookies; }
            set
            {
                m_OutputCookies = value;
                OnPropertyChanged("OutputCookies");
            }
        }

        protected string m_Html = string.Empty;
        public string Html
        {
            get { return m_Html; }
            set
            {
                m_Html = value;
                OnPropertyChanged("Html");
            }
        }
    }
}
